﻿//
//  Windows_libc
//
//  Created by  cc_team(陈旭，陈曦) qq:511272827.
//  Copyright 2011 cc_team. All rights reserved.
//
#ifndef CC_ASSERT_H
#define CC_ASSERT_H

#include "cc_common.h"

__BEGIN_DECLS

// #define assert(expr)	((expr) ? DO_NOTHING : )
#ifdef _DEBUG
void __cdecl cc_assert_helper(const char *message, const char *fileName, unsigned int lineNumber);

#define cc_assert(expression) \
	(expression) ? TRUE : cc_assert_helper(TO_STR(expression), __FILE__, __LINE__)

#else
#define cc_assert(expression)	DO_NOTHING
#endif

__END_DECLS

#endif